package com.example.demo.pattern.factory.abstraces;

import com.example.demo.pattern.factory.Color;
import com.example.demo.pattern.factory.general.Circle;
import com.example.demo.pattern.factory.general.Rectangle;
import com.example.demo.pattern.factory.general.Shape;
import com.example.demo.pattern.factory.general.Square;



public class ShapeFactory extends AbstractFactory {
    @Override
    public Shape getShape(String shapeType) {
        if (shapeType == null) return null;
        if (shapeType.equalsIgnoreCase("circle")){
            return new Circle();
        }else if (shapeType.equalsIgnoreCase("rectangle")){
            return new Rectangle();
        }else if (shapeType.equalsIgnoreCase("square")){
            return new Square();
        }else{
            return null;
        }
    }

    @Override
    public Color getColor(String colorType) {
        return null;
    }

}
